#sage
from libnum import n2s
n= 6706056417909032146977148210894497447322670892758026214857499040210310599424027594966978579750086907555556785153774781114612452198663154506193494869117293
c= 1242680122077482326416451537576315381462840270521607042121188408927264012190282446465124987976978765626943470962693854431894739138078757743809643142105235
e= 16

# quadratic residue
def qr(n, e, c):
    R.<x> = Zmod(n)[]
    f = x^e - c
    result = [int(i[0]) for i in f.roots()]
    return result

for i in qr(n, e, c): print(n2s(i))
